package edu.jit.flowers.service;
import java.util.List;
import edu.jit.flowers.bean.Flowers;
import edu.jit.flowers.dao.FlowersDAO;
public class FlowersService {
	private FlowersDAO fDao=new FlowersDAO();
	//获取所有的鲜花信息
	public List<Flowers> getAllFlowers(){
		return fDao.selectAll();
	}
	//根据花名获取所有的鲜花信息
		public Flowers getAllFlowersByfName(String fname){
			return fDao.selectFlowersByName(fname);
		}
	//修改鲜花信息
	public int updateFlowers(Flowers f) {
		return fDao.updateFlowersById(f);
	}
	//增加鲜花信息
	public int addFlowers(Flowers f) {
		return fDao.addFlowers(f);
	}
	//删除鲜花信息
	public int deleteFlowers(String name) {
		return fDao.deleteflowersByFName(name);
	}

}
